package cn.wonderland.feign.client;

import cn.wonderland.domain.User;
import cn.wonderland.feign.fallback.UserFeignClientFallBack;
import cn.wonderland.utils.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "user-server",path ="user",fallbackFactory = UserFeignClientFallBack.class)
public interface UserFeignClient {

    @GetMapping("/getUserByUserId/{id}")
    JSONResult<User> getUserByUserId(@PathVariable("id") Long id);

}
